package vn.com.fsoft.business.impl;

import java.util.List;

import vn.com.fsoft.business.IContactBusiness;
import vn.com.fsoft.model.dao.impl.ContactDAO;
import vn.com.fsoft.model.entities.Contact;

public class ContactBusiness implements IContactBusiness {

	public ContactBusiness() {
		contactDAO = new ContactDAO();
	}

	/* Declare variable */
	private ContactDAO contactDAO;

	/* Getter and Setter */

	public ContactDAO getContactDAO() {
		return contactDAO;
	}

	public void setContactDAO(ContactDAO contactDAO) {
		this.contactDAO = contactDAO;
	}

	@Override
	public List<Contact> getAllContact(int pageSize, int currentPage) {
		return contactDAO.getAllContact(pageSize, currentPage);
	}

	public long getRowCountContact() {
		return contactDAO.countContact();
	}

}
